import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  server:{
    proxy:{
      '/tools':{
        // target:'http://localhost:9000',
        target: 'http://11.90.67.209',
        changeOrigin:true,
        rewrite:(path)=>path.replace(/^\/tools/, 'tools'),
        bypass(req, res,options) {

          let url = options.target  + options.rewrite(req.url);

          console.log(url);
        },
      }
    }
  }
})
